package com.iteye.trafficRecorder;

public class MyLocation {
	
	private String phoneNum;
	
	private String locationId;
	//时间
	private long time;
	//经度
	private double longitude;
	//纬度
	private double latitude;
	//海拔
	private double altitude;
	//信号类别
	private String provider;
	//星数
	private int satelliteCount;
	//速度
	private float speed;
	//温度
	private float temperature;
	//方位
	private float direction;
	//距离
	private float distance;
	
	public String getPhoneNum() {
		return phoneNum;
	}
	public void setPhoneNum(String phoneNum) {
		this.phoneNum = phoneNum;
	}
	public long getTime() {
		return time;
	}
	public void setTime(long time) {
		this.time = time;
	}
	public double getLongitude() {
		return longitude;
	}
	public void setLongitude(double longitude) {
		this.longitude = longitude;
	}
	public double getLatitude() {
		return latitude;
	}
	public void setLatitude(double latitude) {
		this.latitude = latitude;
	}
	public double getAltitude() {
		return altitude;
	}
	public void setAltitude(double altitude) {
		this.altitude = altitude;
	}
	public String getProvider() {
		return provider;
	}
	public void setProvider(String provider) {
		this.provider = provider;
	}
	public int getSatelliteCount() {
		return satelliteCount;
	}
	public void setSatelliteCount(int satelliteCount) {
		this.satelliteCount = satelliteCount;
	}
	public float getSpeed() {
		return speed;
	}
	public void setSpeed(float speed) {
		this.speed = speed;
	}
	public float getTemperature() {
		return temperature;
	}
	public void setTemperature(float temperature) {
		this.temperature = temperature;
	}
	public float getDirection() {
		return direction;
	}
	public void setDirection(float direction) {
		this.direction = direction;
	}
	public String getLocationId() {
		return locationId;
	}
	public void setLocationId(String locationId) {
		this.locationId = locationId;
	}
	public float getDistance() {
		return distance;
	}
	public void setDistance(float distance) {
		this.distance = distance;
	}
	public String toXml() {
		StringBuffer sb = new StringBuffer();
		sb.append("<Document TaskGuid = \""+WebService.taskGuid+"\" DataGuid = \""+locationId+"\" DataType=\""+WebService.dataType_location+"\">");
		sb.append("  <Guid Type=\"GUID\">"+locationId+"</Guid>");
		sb.append("  <PhoneNum Type=\"TEXT\">"+phoneNum+"</PhoneNum>");
		sb.append("  <LON Type=\"SINGLE\">"+longitude+"</LON>");
		sb.append("  <LAT Type=\"SINGLE\">"+latitude+"</LAT>");
		sb.append("  <Address Type=\"TEXT\"></Address>");
		sb.append("  <CreateTime Type=\"DATE\">"+time+"</CreateTime>");
		sb.append("  <Speed Type=\"DOUBLE\">"+speed+"</Speed>");
		sb.append("  <Direction Type=\"LONG\">"+direction+"</Direction>");
		sb.append("  <Elevation Type=\"DOUBLE\">"+altitude+"</Elevation>");
		sb.append("  <TotalMile Type=\"LONG\">"+distance+"</TotalMile>");
		sb.append("  <Temperature Type=\"DOUBLE\">"+temperature+"</Temperature>");
		sb.append("  <GPSType Type=\"LONG\">"+provider+"</GPSType>");
		sb.append("  <GPSNumber Type=\"LONG\">"+satelliteCount+"</GPSNumber>");
		sb.append("  <Description Type=\"TEXT\"></Description>");
		sb.append("</Document>");
		return sb.toString();
	}
}
